package com.ttj.controller;

import javax.annotation.Resource;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.ttj.domain.oracle.BUser;
import com.ttj.service.BuserService;
import com.ttj.vo.BaseRes;

/**
 * 登录 / 用户组，收购员，库管 
 */
@Controller
@RequestMapping("login")
public class LoginController {
	
	
	private Logger logger = LoggerFactory.getLogger(LoginController.class);

	@Resource 
	private BuserService buserService;
	
	@RequestMapping(value="/check",method=RequestMethod.GET)
	public @ResponseBody BaseRes<BUser> login(String username,String password){
		logger.debug(username,password);
		return buserService.login(username, password);
	}
}
